/**
 * Copyright (c) 2016-2019 人人开源 All rights reserved.
 *
 * https://www.renren.io
 *
 * 版权所有，侵权必究！
 */

package io.renren.modules.project.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.renren.common.validator.group.AddGroup;
import io.renren.common.validator.group.UpdateGroup;
import io.renren.modules.systemconfig.entity.SystemConfigServersEntity;
import io.renren.ssh.FileAttri;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;

/**
 * 系统用户
 *
 * @author Mark sunlightcs@gmail.com
 */
@Data
@TableName("module")
public class ModuleEntity implements Serializable {
	private static final long serialVersionUID = 1L;
	
	/**
	 * 用户ID
	 */
	@TableId
	private Long id;

	/**
	 * 用户名
	 */
	@NotBlank(message="名称不能为空", groups = {AddGroup.class, UpdateGroup.class})
	private String name;

	private String nameJar;

	private long backendId;
	@TableField(exist = false)
	private String backendName;


	private String moduleType;
	private Long serverId;
	@TableField(exist = false)
	private String serverName;
	@TableField(exist = false)
	private String serverIpaddr;

	private String deployPath;
	private int status;
	private String createTime;

	private long databaseId;
	private long mongodbId;
	private long redisId;
	private String dbName;
	private String mondbName;
	private String redbName;
	@TableField(exist = false)
	private String databaseIpaddr;
	@TableField(exist = false)
	private String mongodbIpaddr;
	@TableField(exist = false)
	private String redisIpaddr;
	@TableField(exist = false)
	private String databaseName;
	@TableField(exist = false)
	private String mongodbName;
	@TableField(exist = false)
	private String redisName;
	@TableField(exist = false)
	private String runtimeStatus;
	@TableField(exist = false)
	private SystemConfigServersEntity server;
	@TableField(exist = false)
	private List<FileAttri> logs;
}
